package controllers

import (
	// "fmt"
	// "menhu/models"

	// beego "github.com/beego/beego/v2/server/web"
	"github.com/beego/beego/v2/server/web/context"
)

//验证登录
var FilterUser = func(ctx *context.Context) {
	_, ok := ctx.Input.Session("name").(string)
	if !ok && ctx.Request.RequestURI != "/login" {
		ctx.Redirect(302, "/login")
	}
}
